package gevis.cm.ap.tabledao;

import gevis.cm.ap.annotation.TablePrimaryKey;
import gevis.cm.ap.tabledto.TableBaseDto;

import java.lang.reflect.Field;

public class TableIODao<T extends TableBaseDto> {
	
	public Integer get(T dto) {
		
		if(checkPrimaryKey(dto) == false) {
			//~~~~
		}
		
		
		
		
		
		
		return 0;
	}

	private boolean checkPrimaryKey(T dto) {
		Class<? extends TableBaseDto> clz = dto.getClass();
		
		
		Field[] fields = clz.getDeclaredFields();
		
		for(Field f: fields) {
			if(f.isAnnotationPresent(TablePrimaryKey.class) == true) {
				if(f.getType() == java.lang.String.class) {
					
				}
			}
				
			
			
		}
		
		return false;
	}
}
